package cn.sytton.taffecloud.common.api.service;

import cn.sytton.taffecloud.common.api.sentinel.fallback.CommonFallbackFactory;
import cn.sytton.taffecloud.common.base.response.R;
import cn.sytton.taffecloud.common.model.file.FileEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.io.File;

/**
 * File服务
 *
 * @author skyrock
 */
@FeignClient(contextId = "remoteFileService", value = "taffecloud-service-file", fallbackFactory = CommonFallbackFactory.class)
public interface RemoteFileService {
    /**
     * 上传临时文件
     * @param file
     * @return
     */
    @PostMapping("/temp")
    R<FileEntity> uploadTemp(@RequestBody File file);
}
